/// @tags:
#include <cstdio>
#include <iostream>
#define rint register int

using std::cin;
using std::cout;

namespace BlueQuantum {

typedef long long LL;

constexpr int mod = 1e9 + 7;

constexpr LL qpow(LL base, int exp = mod - 2) {
  LL res = 1;
  for (; exp; exp >>= 1, base = base * base % mod)
    if (exp & 1) res = res * base % mod;
  return res;
}

constexpr int inv100 = qpow(100);

inline int main() {
  int n;
  cin >> n;
  LL t = 1, r = 0;
  for (int i = 1; i <= n; ++i) {
    LL a, b;
    cin >> a >> b;
    a = a * inv100 % mod, b = b * inv100 % mod;
    LL d = qpow(1 - r * b % mod + mod);
    r = (b + a * a % mod * r % mod * d) % mod;
    t = t * a % mod * d % mod;
  }
  cout << t;
  return 0;
}

}  // namespace BlueQuantum

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen("/tmp/CodeTmp/testdata.in", "r", stdin);
  freopen("/tmp/CodeTmp/testdata.out", "w", stdout);
#else
  freopen("P5323 [BJOI2019] 光线.in", "r", stdin);
  freopen("P5323 [BJOI2019] 光线.out", "w", stdout);
#endif
#endif

  std::ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  return BlueQuantum::main();
}
